package com.csw.data.utils;

/**
 * @Author ChenSW
 * @Date 2016/12/24 10:42
 */
public class StringUtils {

    /**
     * 判断对象是否为NA/""
     *
     * @param obj
     * @return
     */
    public static boolean isEmpty(Object obj) {
        return obj == null || "".equals(obj);
    }

    /**
     * 判断对象数组中是否存在NA/""
     *
     * @param objects
     * @return
     */
    public static boolean hasEmpty(Object... objects) {

        if (isEmpty(objects))
            return true;

        for (Object object : objects) {
            if (isEmpty(object))
                return true;
        }

        return false;
    }

}
